package com.game.cards.monsters;

import com.game.cards.Attribute;
import com.game.cards.Flags;
import com.game.cards.MonsterCard;
import com.game.cards.Type;
import com.game.play.Events;
import com.game.play.Game;

public class BusterBlader extends MonsterCard {
	private int boosts;
	public BusterBlader() {
		this.title = "BUSTER BLADER";
		this.stars = 8;
		this.attribute = Attribute.earth;
		this.type = Type.Warrior;
		this.description = "This card gains 500 extra attack points for every \n" + 
		"DRAGON-type monster card on the field!";
		
		this.flags.add(Flags.effect);
		this.flags.add(Flags.triggereffect);
		
		this.trigger = Events.normalsummon;
		
		this.attack = 2600;
		this.defense = 2300;
		
		this.attacks = 1;
		this.boosts = 0;
		
	}
	public boolean test(Game game) {
		String[] arg = game.getCurrentTurn().getAq().getEventArgs(this.trigger);
		attack-=boosts*500;
		boosts=0;
		for (MonsterCard m : game.getCurrentTurn().getField().getMonsterCards(Type.Dragon))
		{
			boosts++;
		}
		for (MonsterCard m : game.getOffTurn().getField().getMonsterCards(Type.Dragon))
		{
			boosts++;
		}
		this.attack+=boosts*500;
		System.out.println(this.title + " had it's attack raised by " + boosts*500 + "!");
		return true;
		
	}

}
